@extends('Home.User.Common.layout')
@section('title')
    财务数据_数据报告
@endsection
@section('content')
    <!--  content  -->
    <main class="common_content">
        <div class="container">
            <div class="ct_main">
                @include('Home.User.Data.data_menu')
                <ul class="nav-items1 nav-items2 w999" id="tab-content2">
                    <!--财务数据-->
                    <li class="basic-sets active">
                        <form class="selector-head">
                            <h2>财务数据</h2>
                            <div class="rt">
                                <a href="javascript:location.replace(location.href);" class="refresh-btn" title="刷新"><i class="icon icon-shuaxin"></i></a>
                            </div>
                        </form>
                        <div class="layui-form basic-sets-ul">
                            <table class="layui-table">
                                <thead>
                                <tr>
                                    <th>编号</th>
                                    <th>候选人</th>
                                    <th>项目名称</th>
                                    <th>所属客户</th>
                                    <th>渠道来源</th>
                                    <th>推荐人</th>
                                    <th>实际到岗</th>
                                    <th>保质期</th>
                                    <th>应收金额</th>
                                    <th>总回款</th>
                                    <th>总扣款</th>
                                    <th>利润总额</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                @foreach($list as $item)
                                    <tr>
                                        <td data-label="编号"> {{$item->id}} </td>
                                        <td data-label="候选人" title="{{$item->resume_name}}"> {{$item->resume_name}} </td>
                                        <td data-label="项目名称" title="{{$item->position_name}}"> {{$item->position_name}} </td>
                                        <td data-label="所属客户" title="{{$item->client_name}}"> {{$item->client_name}} </td>
                                        <td data-label="渠道来源" title="{{$item->from_type.$item->from_name}}"> {{$item->from_type.$item->from_name}} </td>
                                        <td data-label="推荐人" title="{{$item->assign_name}}"> {{$item->assign_name}} </td>
                                        <td data-label="实际到岗" title="{{$item->entry_time}}"> {{$item->entry_time}} </td>
                                        <td data-label="保质期" title="{{$item->quality}}"> {{$item->quality}} </td>
                                        <td data-label="应收金额" title="{{$item->receivable}}"> {{$item->receivable}} </td>
                                        <td data-label="总回款" title="{{$item->receipts_1}}"> {{$item->receipts_1}} </td>
                                        <td data-label="总扣款" title="{{$item->receipts_0}}"> {{$item->receipts_0}} </td>
                                        <td data-label="利润总额" title="{{$item->profit}}"> {{$item->profit}} </td>
                                        <td data-label="操作" class="tac layui-row layui-col-space10">
                                            <a href="javascript:;" class="edit-btn edit-client" onclick="open_button('{{route('finance_edit',$item->id)}}','查看/编辑')" title="查看/编辑"><i class="layui-icon">&#xe642;</i></a>
                                            <a href="javascript:;" class="edit-btn edit-client" onclick="open_button('{{route('add_finance_schedule',$item->id)}}','款项操作记录',1200)" title="款项操作记录"><i class="layui-icon">&#xe60e;</i></a>

                                        </td>
                                    </tr>
                                    @endforeach
                                </tbody>
                            </table>
                            <!-- 分页 s -->
                            @if($num>1)
                                <div class="news-pager">
                                    <ul class="pagination" id="page">
                                    </ul>
                                    <div class="pageJump">
                                        <span>跳转到</span>
                                        <input type="text"/>
                                        <span>页</span>
                                        <button type="button" class="button">确定</button>
                                    </div>
                                </div>
                            @endif
                            <!-- 分页 e -->
                        </div>
                    </li>
                </ul>
            </div>
        </div>
    </main>
@endsection
@section('footer')
    <script>
        /***  分页 JS  ***/
        Page({
            num: '{{$num}}',		//页码数
            startnum: '{{$page}}',				//指定页码
            elem:$('#page'),		//指定的元素
            callback:function(n){	//回调函数
                window.location.href = '{{route('finance_list')}}?page='+n;
            }
        });
    </script>
@endsection